@extends('mobile.layout')

@section('style')
    @parent
    <link rel="stylesheet" type="text/css" href="{{ asset('static/mobile/css/checking.css') }}?v={{ app('cache.config')->get('asset_version') }}"/>
    <style>
        .layui-m-layershade{
            background-color: rgba(0,0,0,.4)!important;
        }
        .header-section{
            position: static;
        }
    </style>
@stop

@section('script')
    @parent

    <script>
        $('#banner').remove();
    </script>
@stop
@section('holder')@stop


@section('content')
    <div class="container">

        <div class="row box-content">
            <div class="order">
                <div class="item">
                    <div class="row">
                        <div class="left">訂單號</div>
                        <div class="right">{{ $order->no }}</div>
                    </div>
                    <div class="row">
                        <div class="left">訂單狀態</div>
                        <div class="right">{{ \Illuminate\Support\Arr::get(\App\Models\Order::STATUS_TXT,$order->status) }}</div>
                    </div>


                    <div class="row-product">
                        <p class="title">訂單產品</p>
                        <div class="product-main">
                            @foreach($order->products as $item)

                                <div class="product clearfix">
                                    <div class="goods-img"><img src="{{ asset('uploads/'.$item->product_img) }}" alt="{{ $item->product_name }}"></div>
                                    <div class="goods-info">
                                        <p class="goods-name">{{ $item->product_name }}</p>
                                        <p class="goods-number">x {{ $item->number }}</p>
                                        <p class="goods-price">${{ $item->total_price }}</p>
                                    </div>

                                </div>
                            @endforeach
                        </div>
                    </div>

                    <div class="row">
                        <div class="left">支付總額</div>
                        <div class="right">${{ $order->total_price }}（{{ $order->freight>0?"含運費$".$order->freight:"免運費" }}）</div>
                    </div>

                    <div class="row">
                        <div class="left">生產時間</div>
                        <div class="right">{{ $order->created_at }}</div>
                    </div>

                </div>

                <div class="item">
                    <div class="row">
                        <div class="left">收貨姓名</div>
                        <div class="right">{{ $order->name }}</div>
                    </div>

                    <div class="row">
                        <div class="left">聯絡電話</div>
                        <div class="right">{{ $order->phone }}</div>
                    </div>

                    <div class="row">
                        <div class="left">電子郵箱</div>
                        <div class="right">{{ $order->email }}</div>
                    </div>
                </div>

                <div class="item">
                    <div class="row">
                        <div class="left">配送方式</div>
                        <div class="right">
                            @if($order->delivery_type == 1)
                                超商(7-11) 取貨付款
                            @elseif($order->delivery_type == 2)
                                @if($order->shop_type == 2)
                                    超商(全家) 取貨付款
                                @elseif($order->shop_type == 3)
                                    超商(OK) 取貨付款
                                @else
                                    超商(萊爾富) 取貨付款
                                @endif
                            @else
                                快遞宅配 貨到付款
                            @endif

                        </div>
                    </div>
                    @if($order->delivery_type > 0)
                        <div class="row">
                            <div class="left">門市號</div>
                            <div class="right">
                                {{ $order->shop_no }}
                            </div>
                        </div>

                        <div class="row">
                            <div class="left">門市名稱</div>
                            <div class="right">
                                {{ $order->shop_name }}
                            </div>
                        </div>
                    @endif
                    <div class="row">
                        <div class="left">收貨地址</div>
                        <div class="right">{{ $order->city.$order->county.$order->street.$order->address }}</div>
                    </div>

                    @if($order->delivery_type == 0)
                        <div class="row">
                            <div class="left">收貨方式</div>
                            <div class="right">本人收貨</div>
                        </div>
                    @endif
                    <div class="row">
                        <div class="left">送貨時段</div>
                        <div class="right">{{ \Illuminate\Support\Arr::get(\App\Models\Order::DELIVERY_TIME,$order->delivery_time?:1) }}</div>
                    </div>
                </div>

                <div class="item">
                    <div class="row">
                        <div class="left">訂單備註</div>
                        <div class="right">{{ $order->remarks?:"無" }}</div>
                    </div>
                </div>

            </div>

        </div>



    </div>
@endsection
